x = int(input())

ans = set()

n = 1
while n**2 < x/2:
  if not ((x+n) % (2*n+1)):
    ans.add((n, (x+n)//(2*n+1)))
  n += 1

m = 1
while m**2 <= (x-1)/2:
  if not ((x+m-1) % (2*m+1)):
    ans.add(((x+m-1)//(2*m+1), m))
  m += 1

print(len(ans))
for x in ans:
  print(x[0], x[1])
